package pl.krakow.ae.knp.wikiboard.gui.tools;

import pl.krakow.ae.knp.wikiboard.gui.tools.markers.EllipseMarker;
import pl.krakow.ae.knp.wikiboard.gui.tools.transformers.Filler;
import pl.krakow.ae.knp.wikiboard.gui.tools.markers.CurveMarker;
import pl.krakow.ae.knp.wikiboard.gui.tools.markers.RectMarker;
import pl.krakow.ae.knp.wikiboard.gui.tools.markers.StraightLineMarker;
import pl.krakow.ae.knp.wikiboard.gui.tools.markers.TextMarker;
import pl.krakow.ae.knp.wikiboard.gui.tools.transformers.Resizer;
import pl.krakow.ae.knp.wikiboard.gui.tools.transformers.Rotator;
import pl.krakow.ae.knp.wikiboard.gui.tools.transformers.Rubber;
import pl.krakow.ae.knp.wikiboard.gui.tools.transformers.Selector;

/*
 * Class that produces appropriate FigureMarkers
 */
public class ToolsFactory {
    
    public static Tool createTool (ToolType toolType) 
    {
        Tool result = null;
        
        switch(toolType) 
        {
            case SELECTOR:
                result = new Selector();
                break;
            case RUBBER:
                result = new Rubber();
                break;
            case RESIZER:
                result = new Resizer();
                break;
            case ROTATOR:
                result = new Rotator();
                break;
            case FILL_MARKER:
                result = new Filler();
                break;
            case TEXT_MARKER:
                result = new TextMarker();
                break;    
            case LINE_MARKER:
                result = new CurveMarker();
                break;    
            case STRAIGHTLINE_MARKER:
                result = new StraightLineMarker();
                break;    
            case ELLIPSE_MARKER:
                result = new EllipseMarker();
                break;    
            case RECT_MARKER:
                result = new RectMarker();
                break;    
            default:
                result = null;
        }
        return result;
    }
    
}
